package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.BasisTeacherMapper;
import com.ruoyi.system.domain.BasisTeacher;
import com.ruoyi.system.service.IBasisTeacherService;

/**
 * 教师信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-03
 */
@Service
public class BasisTeacherServiceImpl implements IBasisTeacherService 
{
    @Autowired
    private BasisTeacherMapper basisTeacherMapper;

    /**
     * 查询教师信息
     * 
     * @param teacherId 教师信息ID
     * @return 教师信息
     */
    @Override
    public BasisTeacher selectBasisTeacherById(Long teacherId)
    {
        return basisTeacherMapper.selectBasisTeacherById(teacherId);
    }

    /**
     * 查询教师信息列表
     * 
     * @param basisTeacher 教师信息
     * @return 教师信息
     */
    @Override
    public List<BasisTeacher> selectBasisTeacherList(BasisTeacher basisTeacher)
    {
        return basisTeacherMapper.selectBasisTeacherList(basisTeacher);
    }

    /**
     * 新增教师信息
     * 
     * @param basisTeacher 教师信息
     * @return 结果
     */
    @Override
    public int insertBasisTeacher(BasisTeacher basisTeacher)
    {
        basisTeacher.setCreateTime(DateUtils.getNowDate());
        return basisTeacherMapper.insertBasisTeacher(basisTeacher);
    }

    /**
     * 修改教师信息
     * 
     * @param basisTeacher 教师信息
     * @return 结果
     */
    @Override
    public int updateBasisTeacher(BasisTeacher basisTeacher)
    {
        basisTeacher.setUpdateTime(DateUtils.getNowDate());
        return basisTeacherMapper.updateBasisTeacher(basisTeacher);
    }

    /**
     * 批量删除教师信息
     * 
     * @param teacherIds 需要删除的教师信息ID
     * @return 结果
     */
    @Override
    public int deleteBasisTeacherByIds(Long[] teacherIds)
    {
        return basisTeacherMapper.deleteBasisTeacherByIds(teacherIds);
    }

    /**
     * 删除教师信息信息
     * 
     * @param teacherId 教师信息ID
     * @return 结果
     */
    @Override
    public int deleteBasisTeacherById(Long teacherId)
    {
        return basisTeacherMapper.deleteBasisTeacherById(teacherId);
    }
}
